import React, { Component, PropTypes} from 'react';
import ProjectDetail from './detail'
import {Row,Col,Breadcrumb,Layout,Button,Tabs,Card,Menu,Dropdown,Icon,Modal,Input} from 'antd'
import './main.scss'
const { Header, Content, Footer, Sider} = Layout;
const {TabPane} =Tabs
class ProjectData extends Component {

    state={
            mainBodyData:{},
            capitalVisibale:false,
            addr:false,

    }
    constructor(props){
        super(props)
  
        console.log(this.props.id)
    }
    
    componentDidMount() {
     
 }

 handleMenuClick=(e)=>{

   switch(e.key){
       case "3":
       this.setState({capitalVisibale:true})
   }
 }
 getCompanyTypeToText(cType){
    
    switch(cType){
        case "limited":
        return "管理公司";
        case "partner":
        return "合伙企业";
        case "deal-fund":
        return "契约型基金"
        default: return"" 
    }
 }
    render() {

             const menu = (
            <Menu onClick={(e)=>this.handleMenuClick(e)}>
              <Menu.Item key="1">法人变更</Menu.Item>
              <Menu.Item key="2">注册地址变更</Menu.Item>
              <Menu.Item key="3" >注册资本变更</Menu.Item>
              <Menu.Item key="4">股东变更</Menu.Item>
            </Menu>
          );
        return(
        <Row className="main">

        <Modal
          title="北京磐晟投资管理有限公司 注册地址变更"
          visible={this.state.capitalVisibale}
         // onOk={this.hideModal}
          onCancel={()=>this.setState({capitalVisibale:false})}
          okText="提交" cancelText="取消">
        <Row><span style={{marginRight:5}}>原注册资本</span>:￥12,000,00</Row>
        <Row style={{marginTop:10}} type="flex" align="middle">
            <Col span={4}>
            现注册资本:
            </Col>
            <Col style={{marginLeft:5}} span={16}>
            <Input placeholder="" />
            </Col>
            </Row>
        
        </Modal>
            

        <Layout style={{background: '#fff', }}>
        <Breadcrumb style={{ padding: '0 10px 10px',margin: '16px 0' }}>
          <Breadcrumb.Item>磐晟资产</Breadcrumb.Item>
          <Breadcrumb.Item>主体管理</Breadcrumb.Item>
          <Breadcrumb.Item>北京磐晟投资管理有限公司</Breadcrumb.Item>
        </Breadcrumb>
        <Content style={{ background: '#fff', padding: 30, margin: 0}}>
          <Row>
          <Col span={20}><span className="blod" style={{fontSize:20}}>{this.state.mainBodyData.fullname}</span></Col>
            <Col className='titleButton' span={4}>
            <Button size='small' style={{marginLeft:10}}>清算</Button>
            <Button size="small" style={{marginLeft:10}}>退出</Button>
            {/* <Button size='small' style={{marginLeft:10}} type="primary">编辑</Button> */}
            </Col>
         </Row>
         <Row style={{marginTop:20,lineHeight:2,fontSize:14}}>
            <Col span={18}>
            <Row>
                <Col span={12}>
                <p>简称：</p>
                <p>创建时：</p>
                <p>项目经理：</p>
                </Col>
                <Col span={12}>
                <p>资产类型：</p>
                <p>起止时间：</p>
                </Col>
            </Row>
            </Col>
            <Col span={6}>
                <Row>
                <Col span={8}　style={{textAlign:"right"}}>客户数</Col>
                <Col span={8} style={{textAlign:"right"}}>状态</Col>
                <Col span={8} style={{textAlign:"right"}}>订单金额</Col>
                </Row>
                <Row>
                <Col span={8}　style={{textAlign:"right",color:"rgba(82,196,26,0.85)",fontSize:20}}>66</Col>
                <Col span={8} style={{textAlign:"right",fontSize:20,fontWeight:"bold"}}>存续</Col>
                <Col span={8} style={{textAlign:"right",fontSize:20,fontWeight:"bold"}}>¥1000万</Col>
                </Row>
            </Col>
        </Row>

        </Content>
        <Row style={{background:'rgba(240,242,245,1)'}}>
        <Tabs defaultActiveKey="1">
    <TabPane tab="详情" key="1" style={{background:"#fff"}}><ProjectDetail /></TabPane>
    <TabPane tab="主体架构" key="2" style={{background:"#fff",marginLeft:"2.5%"}}></TabPane>
    <TabPane tab="发行产品" key="3" style={{background:"#fff",marginLeft:"2.5%"}}></TabPane>
    <TabPane tab="客户订单" key="4" style={{background:"#fff",marginLeft:"2.5%"}}></TabPane>

  </Tabs>
     </Row>    
        
      </Layout>
   
 
            </Row>

            
        );
    }
}

export default  ProjectData;